<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <style>
        .Odivl {width: 80px; height: 80px; background: #aaa; margin: 5px;}
        .Odiv2 {width: 50px; height: 50px; background: #ccc;}
    </style>

    <div id="app">
        <div class="Odivl" v-on:click.self="doParent">a
            <div class="Odiv2" v-on:click="doThis">b</div>
        </div>
        <div class="Odivl" v-on:click="doParent">c
            <div class="Odiv2" v-on:click.self="doThis">d</div>
        </div>
    </div>

    <script>
        var vm = new Vue({
            el:'#app',
            methods:{
                doParent () {
                    console.log('我是父元素的单击事件')
                },
                doThis () {
                    console.log('我是当前元素的单击事件')
                }
            }
        })
    </script>
</body>
</html>